package org.smi.utils;

public class RemoveDecimalNumbers {
    public static void main(String[] args) {
        String input = "4.18.5.1.新清算系统监控需求二三四";
//        String output = input.replaceAll("^\\d", "")
//                .replaceAll("^\\.", "");
//       boolean b = input.matches("^\\d.*");
//        System.out.println(b);

        String out = cleanNumberAtLineFirst(input);
        System.out.println(out);
    }

    public static String cleanNumberAtLineFirst(String input) {
        boolean number = input.matches("^\\d.*");
        boolean dot = input.matches("^\\.*");

        if (number || dot) {
            String output = input.replaceAll("^\\d", "")
                    .replaceAll("^\\.", "");
            input = cleanNumberAtLineFirst(output);
        }

        return input;
    }
}
